﻿<phone:PhoneApplicationPage 
    x:Class="MijnMultiOSRSSApp.WP71.DetailsPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    xmlns:t="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:appbarutils="clr-namespace:AppBarUtils;assembly=AppBarUtils"
    d:DataContext="{d:DesignData /SampleData/MainViewModelSampleData.xaml}"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768" 
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait" 
    shell:SystemTray.IsVisible="True" t:TiltEffect.IsTiltEnabled="True">

    <t:TransitionService.NavigationInTransition>
        <t:NavigationInTransition>
            <t:NavigationInTransition.Backward>
                <t:SlideTransition Mode="SlideRightFadeIn"/>
            </t:NavigationInTransition.Backward>
            <t:NavigationInTransition.Forward>
                <t:SlideTransition Mode="SlideLeftFadeIn"/>
            </t:NavigationInTransition.Forward>
        </t:NavigationInTransition>
    </t:TransitionService.NavigationInTransition>
    <t:TransitionService.NavigationOutTransition>
        <t:NavigationOutTransition>
            <t:NavigationOutTransition.Backward>
                <t:SlideTransition Mode="SlideRightFadeOut"/>
            </t:NavigationOutTransition.Backward>
            <t:NavigationOutTransition.Forward>
                <t:SlideTransition Mode="SlideLeftFadeOut"/>
            </t:NavigationOutTransition.Forward>
        </t:NavigationOutTransition>
    </t:TransitionService.NavigationOutTransition>

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="PageTitle" Text="{Binding Title, Source={StaticResource Assembly}, Converter={StaticResource StringCaseConverter}, ConverterParameter=u}" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="ListTitle" Text="{Binding SelectedItem.Title, Converter={StaticResource StripHtmlConverter}}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel contains details text. Place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <ScrollViewer>
                <StackPanel>
                    <Grid Margin="12,0,0,12">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Image Source="{Binding SelectedItem, Converter={StaticResource SyndicationToImageConverter}}" Width="Auto" MaxHeight="225" Height="Auto" HorizontalAlignment="Left" Stretch="UniformToFill" />
                    </Grid>
                    <ItemsControl ItemsSource="{Binding SelectedItem, Converter={StaticResource HtmlToTextConverter}}" />
                    <HyperlinkButton HorizontalAlignment="Left" Command="{Binding BrowseUrl}" CommandParameter="{Binding SelectedItem.Link, Converter={StaticResource SyndicationLinksToUrlConverter}}">
                        <TextBlock Text="{Binding SelectedItem.Link, Converter={StaticResource SyndicationLinksToUrlConverter}}" Style="{StaticResource PhoneTextAccentStyle}" TextWrapping="Wrap" Margin="0,0,0,12" />
                    </HyperlinkButton>
                </StackPanel>
            </ScrollViewer>
        </Grid>
        <Image Grid.RowSpan="2" Source="/Achtergrond.png" Stretch="UniformToFill" Canvas.ZIndex="-100" Opacity="0.6"/>
    </Grid>

    <!-- Application Bar -->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" Mode="Default">
            <shell:ApplicationBarIconButton IconUri="/Resources/Icons/share.png" Text="shareId"/>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

    <!-- Application Bar Interaction -->
    <i:Interaction.Behaviors>
        <appbarutils:AppBarItemCommand Id="shareId" Command="{Binding Share}"/>
    </i:Interaction.Behaviors>
    <i:Interaction.Triggers>
        <appbarutils:AppBarItemTrigger Id="shareId" Text="{Binding LocalizedResources.Share, Source={StaticResource LocalizedStrings}}" />
    </i:Interaction.Triggers>

</phone:PhoneApplicationPage>